GetOrdinalObjectDescriptor Function
Returns an AppleEventObjectSpecifier that is within another AppleEventObjectSpecifier. The AppleEventObjectSpecifier is found by class and an ordinal key.
Syntax
result = GetOrdinalObjectDescriptor( DesiredClass, Object, OrdinalKey )
Parameters | ||
DesiredClass |
Indicates the class of AppleEvent object you are looking for. |
|
Object |
The source object. Pass Nil to search at the application level. |
|
OrdinalKey |
The scope to use when searching. |
Notes
The ordinal keys are:
Key | Description |
firs | First |
last | Last |
midd | Middle |
any | Any |
all | All |
Ordinal keys are four characters so the "any" and "all" keys have a space following them.
Example
This example asks the Finder for a count of the currently running processes:
Dim i, count as Integer
a = NewAppleEvent("core", "cnte", "MACS")
a.MacTypeParam("kocl") = "prcs"
a.ObjectSpecifierParam("----") = GetOrdinalObjectDescriptor("prcs", nil, "all ")
If a.Send then
count = Val(a.ReplyString)
End if
See Also
AppleEvent class; GetIndexedObjectDescriptor, GetNamedObjectDescriptor, GetPropertyObjectDescriptor, GetRangeObjectDescriptor, GetStringComparisonObjectDescriptor, GetTestObjectDescriptor functions.